﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Admin.CYT369.Com.WebBase
{
    public class ExecuteResult
    {
        /// <summary>
        /// true:成功; false：失败
        /// </summary>
        public bool Result { get; set; }

        /// <summary>
        /// 状态消息
        /// </summary>
        public string Msg { get; set; }

        /// <summary>
        /// 状态码
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        /// 返回数据
        /// </summary>
        public object Data { get; set; }

        public ExecuteResult()
        {
        }

        public ExecuteResult(bool result)
        {
            this.Result = result;
        }

        public ExecuteResult(bool result, object d)
        {
            this.Result = result;
            this.Data = d;
        }

        public ExecuteResult(bool result, string msg)
        {
            this.Result = result;
            this.Msg = msg;
        }

        public ExecuteResult(bool result, string msg, object d)
        {
            this.Result = result;
            this.Msg = msg;
            this.Data = d;
        }

        public ExecuteResult(bool result, int code, string msg)
        {
            this.Result = result;
            this.Code = code;
            this.Msg = msg;
        }

        public ExecuteResult(bool result, int code, string msg, object d)
        {
            this.Result = result;
            this.Code = code;
            this.Msg = msg;
            this.Data = d;
        }

    }

}
